import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'; // svg-icon

import type { Plugin } from 'vite';

export const configSvgIconsPlugin = (iconDirs: string[], customDomId: string): Plugin =>
  createSvgIconsPlugin({
    // 指定需要缓存的图标文件夹
    iconDirs,
    // 指定symbolId格式
    symbolId: 'icon-[dir]-[name]',
    customDomId,
  });
